package edu.seu.mart.service.impl;

import edu.seu.mart.dao.ICommentDao;
import edu.seu.mart.entity.Pager;
import edu.seu.mart.model.Comment;
import edu.seu.mart.service.ICommentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2015/3/24.
 */
@Service
public class CommentService implements ICommentService {

    @Resource
    private ICommentDao commentDao;

    @Override
    public void add(Comment comment) {
        commentDao.add(comment);
    }

    @Override
    public Pager<Comment> findCommentByGoods(int goodsId) {
        return commentDao.findCommentByGoods(goodsId);
    }

    @Override
    public Pager<Comment> findCommentByLevel(int goodsId, String level) {
        return commentDao.findCommentByLevel(goodsId, level);
    }
}
